package com.lantosec.hmrp.modules.report.controller;

import com.lantosec.hmrp.core.kit.PageVO;
import com.lantosec.hmrp.core.kit.Result;
import com.lantosec.hmrp.modules.report.service.ILargeSetupCheckService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@Api(value = "大型设备检查监控控制器", tags = "大型设置检查监控控制器")
@RestController
@RequestMapping("/report/large/setup")
@Log4j2
public class LargeSetupCheckController {
    @Autowired
    private ILargeSetupCheckService iLargeSetupCheckService;

    @GetMapping("getBigChkNegPosMonitor")
    @ApiOperation(value = "大型检查阳性率(1)")
    public Result<PageVO<Map<String,Object>>> getBigChkNegPosMonitor(@ApiParam(value = "分页",required = true) PageVO<Map<String,Object>> page,
                                                                     @ApiParam(value = "开始时间") @RequestParam(name = "startTime",required = false) String startTime,
                                                                     @ApiParam(value = "结束时间") @RequestParam(name = "endTime",required = false) String endTime,
                                                                     @ApiParam(value = "科室名称") @RequestParam(name = "deptName",required = false) String deptName,
                                                                     @ApiParam(value = "开单医生") @RequestParam(name = "docName",required = false) String docName,
                                                                     @ApiParam(value = "账期状态", required = true) @RequestParam(name = "dateState") Integer dateState,
                                                                     @ApiParam(value = "科室名称状态", required = true) @RequestParam(name = "deptState") Integer deptState,
                                                                     @ApiParam(value = "开单医生状态", required = true) @RequestParam(name = "docNameState") Integer docNameState) {
        PageVO<Map<String,Object>> bigChkNegPosMonitor = iLargeSetupCheckService.getBigChkNegPosMonitorList(page,startTime,endTime,deptName,docName,dateState,deptState,docNameState);
        return Result.ok(bigChkNegPosMonitor);
    }

    @GetMapping("getChkFeeMonitor")
    @ApiOperation(value = "检查偷漏费监控(2)")
    public Result<PageVO<Map<String,Object>>> getChkFeeMonitor(@ApiParam(value = "分页",required = true) PageVO<Map<String,Object>> page,
                                                                     @ApiParam(value = "开始时间") @RequestParam(name = "startTime",required = false) String startTime,
                                                                     @ApiParam(value = "结束时间") @RequestParam(name = "endTime",required = false) String endTime,
                                                                     @ApiParam(value = "账期状态", required = true) @RequestParam(name = "dateState") Integer dateState) {
        PageVO<Map<String,Object>> bigChkNegPosMonitor = iLargeSetupCheckService.getChkFeeMonitorList(page,startTime,endTime,dateState);
        return Result.ok(bigChkNegPosMonitor);
    }

    @GetMapping("getCheckNumber")
    @ApiOperation(value = "检查数(2)")
    public Result<PageVO<Map<String,Object>>> getCheckNumber(@ApiParam(value = "分页",required = true) PageVO<Map<String,Object>> page,
                                                             @ApiParam(value = "开始时间") @RequestParam(name = "startTime",required = false) String startTime,
                                                             @ApiParam(value = "结束时间") @RequestParam(name = "endTime",required = false) String endTime,
                                                             @ApiParam(value = "患者姓名") @RequestParam(name = "patientName",required = false) String patientName,
                                                             @ApiParam(value = "病例号") @RequestParam(name = "medRecordNo",required = false) String medRecordNo,
                                                             @ApiParam(value = "开单医生") @RequestParam(name = "billHisDoctor",required = false) String billHisDoctor,
                                                             @ApiParam(value = "检查医生") @RequestParam(name = "chkHisDoctor",required = false) String chkHisDoctor,
                                                             @ApiParam(value = "诊断名称") @RequestParam(name = "diagName",required = false) String diagName,
                                                             @ApiParam(value = "检查名称/类型") @RequestParam(name = "chkName",required = false) String chkName,
                                                             @ApiParam(value = "检查科室") @RequestParam(name = "chkHisDept",required = false) String chkHisDept,
                                                             @ApiParam(value = "检查部位") @RequestParam(name = "chkPart",required = false) String chkPart,
                                                             @ApiParam(value = "收费状态（0全部/1已收费/2未收费）", required = true) @RequestParam(name = "feeState") String feeState,
                                                             @ApiParam(value = "账期状态", required = true) @RequestParam(name = "dateState") Integer dateState) {
        PageVO<Map<String,Object>> bigChkNegPosMonitor = iLargeSetupCheckService.getCheckNumberList(page,startTime,endTime,patientName,medRecordNo,billHisDoctor,chkHisDoctor,diagName,chkName,chkHisDept,chkPart,feeState,dateState);
        return Result.ok(bigChkNegPosMonitor);
    }
}
